<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>可视区域</title>
    <style>
        body{
            height: 1000px;
        }
    </style>
</head>
<body>
    <script>
        console.log(window.innerHeight);
       
        console.log(document.body.scrollTop || document.documentElement.scrollTop);
    </script>
</body>
</html>